package the.broccoli.ac.service;

import org.wisteria.framework.web.mvc.service.ISuperService;
import org.wisteria.framework.web.mvc.dto.TreeDTO;
import the.broccoli.ac.constant.ResType;
import the.broccoli.ac.dto.ResTree;
import the.broccoli.ac.entity.Res;

import java.util.List;

/**
 * <p>
 * 资源（目录、菜单，按钮、页面） 服务类
 * </p>
 *
 * @author lei.liu
 * @since 2020-04-07
 */
public interface IResService extends ISuperService<Res> {

    /**
     * 获取应用的所有资源信息
     * @param appIdList     应用ID
     * @return
     */
    List<Res> listByAppIdBatch(List<Integer> appIdList);

    /**
     * 获取应用资源树
     * @param appIdList 应用ID
     * @return
     */
    List<ResTree> getAppResTree(List<Integer> appIdList, List<ResType> resTypeList);

    /**
     * 获取资源树
     * @param appId 应用ID
     * @return
     */
    List<ResTree> getTree(Integer appId, List<ResType> resTypeList);

    List<ResTree> getTreeForAppId(List<Integer> appIdList, List<ResType> resTypeList);

    List<ResTree> getTree(List<String> resIdList, List<ResType> resTypeList);

}
